﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cn.Edwon.Util {
    public class StrUtil {
        public static String Cut(String rContent, Int32 rLength, String rTail) {
            if (rContent == null) return "";
            if (rContent.Length >= rLength) {
                return rContent;
            } else {
                rContent = rContent.Substring(0, rLength);
                if(rTail!=null)
                    rContent += rTail;
                return rContent;
            }
        }
        public static String Cut(String rContent, Int32 rLength) {
            return Cut(rContent, rLength, null);
        }
    }
}
